﻿using System;
using System.Threading;
using ThunderJob.Bootstrapper;
using ThunderJob.Controllers.Security;

namespace ThunderJob.Web
{
    // Note: For instructions on enabling IIS6 or IIS7 classic mode, 
    // visit http://go.microsoft.com/?LinkId=9394801

    public class MvcApplication : System.Web.HttpApplication
    {
        #region AutenticateRequest

        protected void Application_AuthenticateRequest(Object sender, EventArgs e)
        {
            Thread.CurrentPrincipal = Context.User = new UserPrincipal(new UserIdentity(1, "nombre"), null);
        }

        #endregion

        protected void Application_Start()
        {
            StartUp.Init();
        }
    }
}